home *** CD-ROM | disk | FTP | other *** search
- /*
- File: DirectObject.h
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- #ifndef __DIRECTOBJECT__
- #define __DIRECTOBJECT__
-
- #ifndef __TYPES__
- #include "Types.h"
- #endif
-
- #pragma push
- #pragma segment DirectObject
-
- class ostream;
-
- /***********************************|****************************************/
-
- class TDirectObject
- {
- public: TDirectObject ();
- virtual ~TDirectObject ();
-
- virtual ostream& operator >> ( ostream& ) const;
-
- #if defined ( debug )
- Boolean TDirectObject::IsValidObject ( Boolean mustReturn = false ) const;
- static Boolean IsADirectObject ( const void * p );
- #endif
-
- public: void* operator new ( unsigned int );
- void operator delete ( void* );
-
- protected: TDirectObject ( const TDirectObject& );
- TDirectObject& operator = ( const TDirectObject& );
-
- #if defined ( debug )
- private: OSType fTag;
- #endif
- };
-
- /***********************************|****************************************/
-
- #if defined ( THINK_CPLUS ) || defined ( __SC__ )
- typedef TDirectObject SingleObject;
- #endif
-
- const OSType kDirectObjectTag = 'DTAG';
- extern ostream& operator << ( ostream& s, const TDirectObject* o );
- inline ostream& operator << ( ostream& s, const TDirectObject& o ) { return o >> s; };
-
- /***********************************|****************************************/
-
- #pragma pop
-
- #endif // __DIRECTOBJECT__
-